package com.nashuju.web.entity.sys;

import java.util.List;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.nashuju.web.common.TreeAware;

public class SysRes implements TreeAware {
    private int srId;
    private Integer parentId;
    private String resName;
    private String url;

    private List<SysRes> children;
    private List<SysFunction> sysFuns;

    public void setSrId(int srId) {
        this.srId = srId;
    }

    public int getSrId() {
        return this.srId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Integer getParentId() {
        return this.parentId;
    }

    public void setResName(String resName) {
        this.resName = resName;
    }

    public String getResName() {
        return this.resName;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUrl() {
        return this.url;
    }

    @JsonProperty("_parentId")
    public int getEasyUIParentId() {
        return parentId;
    }

    public List<SysRes> getChildren() {
        return children;
    }

    public void setChildren(List<SysRes> children) {
        this.children = children;
    }

    @Override
    public int getId() {
        return this.srId;
    }

    @Override
    public String getText() {
        return resName;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        return this.srId == ((SysRes) obj).srId;
    }

    public List<SysFunction> getSysFuns() {
        return sysFuns;
    }

    public void setSysFuns(List<SysFunction> sysFuns) {
        this.sysFuns = sysFuns;
    }

}
